package com.freemyleft.left.zapp.app;

import com.freemyleft.left.zapp.util.LeftPreference;

/**
 * Created by FreeMyleft on 2017/12/11.
 */

/**
 * 检查是否登录过
 */
public class AccountManager {
    private enum SignTag{
        SIGN_TAG
    }
    public static void setSignState(boolean state){
        LeftPreference.setAppFlag(SignTag.SIGN_TAG.name(),state);
    }
    private static boolean isSignIn() {
        return LeftPreference.getAppFlag(SignTag.SIGN_TAG.name());
    }
    public static void checkAccount( IUserChecker checker){
        if (isSignIn()){
            checker.onSigIn();
        }else {
            checker.onNotSigIn();
        }

    }
}
